package com.spring.aop;

import org.springframework.aop.framework.AopContext;
import org.springframework.stereotype.Service;

@Service
public class HelloService implements IHelloService{
	@Override
	public void sayHello() {
		System.out.println("Hello Service");

		//从ThreadLocal中 获得代理对象 并进行调用；
		IHelloService helloService = (IHelloService) AopContext.currentProxy();
		helloService.sayBye();
	}

	@Override
	public void sayBye() {
		System.out.println("Bye Service");
	}
}
